{*include file="template/admin_head.htm"*}
<link rel="stylesheet" href="/public/js/chosen/chosen.css">
<link rel="stylesheet" href="/public/js/tageditor/jquery.tag-editor.css">
<script src="/public/js/tageditor/jquery.tag-editor.js"></script>
<script src="/public/js/jquery/jquery.colorpicker.js" type="text/javascript"></script>
<script src="/public/js/chosen/chosen.jquery.js" type="text/javascript"></script>
<script src="/public/js/jquery/jquery.cookie.js"></script>
  
<table id="containtable" cellspacing="0" cellpadding="0" class="{*$cf_controller*}">
    <tr>
        <td width="1979" valign="top" bgcolor="#FFFFFF">
            <div class="wrapper pr_8">
			{*if $cf_action=='detail'*}
			<div class="content_panel_title">
				<div class="contentpanelleft"></div>
				<div class="contentpanelcenter">
					<span class="contentpanelcenter_font">搭伙购详情</span>
					<span><a class="edit at" href="{*$cf_self_page*}?dpt={*$cf_dpt*}">搭伙购管理</a></span></div>
				<div class="contentpanelrihgt"></div>
            </div>
			
			<div class="content_table_center_style">
                    <div class="p8">
						<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl tbl_nbr">
							    <tbody>
							    </tbody>
							    <tbody>
								<tr>
								    <td colspan="4" class="stitle">搭伙购信息&nbsp;&nbsp;</td>
								</tr>
								<tr>
								    <td width="12%" align="right">商品标题:</td>
								    <td width="38%" align="left">{*$row['goods_info']['goods_name']*}</td>
								    <td width="12%"align="right">商品图片:</td>
								    <td width="38%" align="left"><img src="{*$row['goods_info']['goods_index_image']*}" height="80" border="0" /></td>
								</tr>
								<tr>
									<td align="right">参与人数:</td>
									<td width="38%" align="left">{*$row['board_sales']*}</td>
									<td width="12%"align="right">目标人数:</td>
								    <td width="38%" align="left">{*$row['goods_info']['goods_board_least_number']*}</td>
								</tr>
								<tr>
									<td align="right">开始时间:</td>
									<td width="38%" align="left">{*$row['board_start_time']*}</td>
									<td width="12%"align="right">结束时间:</td>
								    <td width="38%" align="left">{*$row['board_end_time']*}</td>
								</tr>
								<tr>
								    <td align="right">发起人:</td>
								    <td colspan="3" align="left">{*$row['board_user']*}</td>
								</tr>
								<tr>
								    <td align="right">拉伙王:</td>
								    <td colspan="3" align="left">{*if $row['most_user']['order_puser']*}{*$row['most_user']['order_puser']*}(推广的订单数:{*$row['most_user']['user_count']*}) <a href="/admin/board-act_detail_id_{*$id*}_opid_{*$row['most_user']['order_pid']*}.htm?dpt={*$cf_dpt*}" class="edit">查看推广订单</a>{*/if*}</td>
								</tr>							
							    </tbody>
						</table>                        
                    </div>
                </div>
				
			<div class="content_main_bottom">
				<div class="content_main_bottom_left"></div>
				<div class="content_main_bottom_right"></div>
		    </div>
			
			
			<div class="content_panel_title">
				<div class="contentpanelleft"></div>
				<div class="contentpanelcenter">
					<span class="contentpanelcenter_font">搭伙购订单</span>
				</div>
				<div class="contentpanelrihgt"></div>
            </div>
			
			<div class="content_table_center_style">
                    <div class="p8">
						<table width="100%" class="tbl tbl_nbr">
                                <thead>
                                    <tr class="thd">
                                        <td width="4%" align="center" class="thr">ID</td>
                                        <td width="12%" align="center" class="thr">订单号</td>
                                        <td width="24%" align="center" class="thr">订单商品</td>
                                        <td width="4%" align="center" class="thr">数量</td>
                                        <td width="7%" align="center" class="thr">订单总额</td>
                                        <td width="6%" align="center" class="thr">收货人</td>
                                        <td width="11%" align="center" class="thr">联系电话</td>
                                        <td width="13%" align="center" class="thr">下单时间</td>
                                        <td width="8%" align="center" class="thr">客户</td>
                                        <td width="6%" align="center" class="thr">状态</td>
                                        <td colspan="2" align="center" class="thr">操作</td>
                                    </tr>
                                </thead>
                                <tbody>
                                    {*foreach $data_ary as $item*}                                   

                                    <tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'">
                                        <td align="center">  {*$item['order_id']*}</td>
                                        <td align="left"><a href="{*$cf_self_path*}-act_detail_id_{*$item['order_id']*}.htm?dpt={*$cf_dpt*}" class="edit" target="_blank">{*$item['order_sn']*}</a></td>
                                        <td align="left">
										{*foreach $item['order_detail'] as $v2*}
                                        {*foreach $v2 as $v3*}                                       
										{*$v3['item_name']*}  {*$v3['item_option']*}<br />
                                        {*/foreach*}
										{*/foreach*} 
										</td>
                                        <td align="center">{*$item['order_total_count']*}</td>
                                        <td align="center"><span class="orange">
                                        	{*$item['order_all_total']*}
                                        </span></td>
                                        <td align="center"><span class="orange">
						{*$item['order_name']*}
					    </span></td>
                                        <td align="center"><span class="orange">
                                        	{*$item['order_phone']*}
                                        </span></td>
                                        <td align="center"><span class="orange">
                                        	{*$item['order_create_time']*}
                                        </span></td>
                                        <td align="center">{*$item['order_user']*}</td>
                                        <td align="center">{*$cf_info_var_common['order_status'][$item['order_status']]*}</td>
                                        <td width="5%" align="center"><a href="/admin/order-act_detail_id_{*$item['order_id']*}.htm?dpt={*$cf_dpt*}" class="edit" target="_blank">详情</a>
                                  
                                        </td>

                                    </tr>

                                    {*/foreach*}


                                    <tr class="tft">
                                        <td colspan="11" style="padding:0;">
                                            <table width="100%" border="0">
                                                <tr>
                                                    <td width="3%" align="center" style="border:0;padding:0;"><!--合计:--></td>
                                                    <td width="5%" align="center" style="border:0;padding:0;"><!--共:<span class="blue">{*$total_count*}</span>&nbsp;&nbsp;&nbsp;&nbsp;已完成:<span class="blue">{*$real_count*}</span>--></td>
                                                    <td width="92%" style="border:0;padding:0;" ><div class="turnPage"><p>{*$page*}</p></div></td>
                                                </tr>
                                            </table>
                                      </td>
                                    </tr>
                                </tbody>
                            </table>                        
                    </div>
                </div>
				
			<div class="content_main_bottom">
				<div class="content_main_bottom_left"></div>
				<div class="content_main_bottom_right"></div>
		    </div>
			
			{*else*}
			<script type="text/javascript">
			
			$(function(){
				load_province('cate',"{*$cate1*}","{*$cate2*}");
				$("#cate1").change(function(){                                   //更改分类
					change_province('cate',$(this).val());
				});
				
				$("#checkall").toggle(
                    function(){
                        select_all("idlist[]",true);
                    },
                    function(){
                        select_all("idlist[]",false);
                    }
                );
				
				$("#list_form").submit(function(){
					if(!count_select("idlist[]")){
						my_alert('请选择记录','操作提示');
						return false;
					};
					if($("#alltype").val()==''){
						my_alert('请选择操作方式','Error',"$('#alltype').focus()");
						return false;
					};
					if(confirm('确定进行操作?')==false){
						return false;
					}
					return true;
                });				
			})
			</script>
			
			<div class="pannel">
				<div class="pl"></div>
				<div class="pr"></div>
				<div class="pc">
					<form action="" method="get" id="search_form" name="search_form">
					<input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
					<input name="self" id="dpt" type="hidden" value="{*$self*}" />
					<div class="pt">
						商品标题:
						<input type="text" size="20" id="skey" name="skey" class="tet" value="{*$skey*}" />											
						&nbsp;&nbsp;创建时间:
					<input name="start" class="Wdate" type="text" id="act_start" value="{*$start*}" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'act_end\')}',dateFmt:'yyyy-MM-dd',isShowClear:true,readOnly:true});" size="12" maxlength="30" />
					到<input name="end" class="Wdate" type="text" id="act_end" value="{*$end*}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'act_start\')}',dateFmt:'yyyy-MM-dd',isShowClear:true,readOnly:true});" size="12" maxlength="30" />
					 &nbsp;			   
					  <input type="image" src="public/images/admin/icon_search_btn.gif" />
					</div>
					</form>
				</div>
		    </div>
			
			<div class="content_panel_title">
				<div class="contentpanelleft"></div>
				<div class="contentpanelcenter">
					<span class="contentpanelcenter_font">搭伙购管理</span>&nbsp;
				</div>
				<div class="contentpanelrihgt"></div>
		    </div>
			
			<div class="content_table_center_style">
			<div class="p8">
			    <div class="bq clearfix">
				<b><a href="{*$cf_self_path*}-act_index.htm?dpt={*$cf_dpt*}" class="{*if $self==''*}active{*/if*}">所 有 </a></b>
				{*foreach $cate_array as $item*}
				{*if $item['id']==$cate1 && $cate1!=''*}
				{*assign var=class value='active'*}
				{*else*}
				{*assign var=class value=''*}
				{*/if*}
				<b><a href="{*$cf_self_path*}-act_index.htm?dpt={*$cf_dpt*}&cate1={*$item['id']*}" class="{*$class*}" >{*$item['title']*}</a></b>
				{*/foreach*}
			    </div>
			    <form name="list_form" id="list_form" method="post" action="{*$cf_self_page*}">
				<input name="act" type="hidden" value="all" />
				<input name="dpt" type="hidden" value="{*$cf_dpt*}" />
				<table width="100%" class="tbl tbl_nbr">
				    <thead>
					<tr class="thd">
					    <td width="3%" align="center" class="thr">ID</td>
					    <td width="17%" align="center" class="thr">商品标题</td>
					    <td width="10%" align="center" class="thr">封面图</td>
					    <td width="10%" align="center" class="thr">参与人数</td>
					    <td width="10%" align="center" class="thr">目标人数</td>
					    <td width="9%" align="center" class="thr">开始时间</td>
					    <td width="7%" align="center" class="thr">结束时间</td>
					    <td width="10%" align="center" class="thr">创建时间</td>
					    <td align="center" class="thr">操作</td>
					</tr>
				    </thead>
				    <tbody>
					{*foreach $data_ary as $item*}
					<tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'">
					    <td align="center">{*$item['board_id']*}</td>
					    <td align="left"><a href="/default/goods-act_detail_id_{*$item['goods_id']*}.htm" title="查看詳情" class="edit" target="_blank">{*$item['goods_name']*}</a></td>
					    <td align="center"><a href="{*$item['goods_index_image']*}" target="_blank" ><img src="{*$item['goods_index_image']*}" height="50px" /></a></td>
					    <td align="center">{*$item['board_sales']*}</td>
					    <td align="center">{*$item['goods_board_least_number']*}</td>
					    <td align="center">{*$item['board_start_time']*}</td>
					    <td align="center">{*$item['board_end_time']*}</td>
					    <td align="center">{*$item['board_create_time']*}</td>
					    <td width="5%" align="center"><a href="{*$cf_self_path*}-act_detail_id_{*$item['board_id']*}.htm?dpt={*$cf_dpt*}" class="edit">查看</a></td>
					    </tr>
					{*/foreach*}
					<tr class="tft">
					    <td colspan="9" style="padding:0;">
						<table width="100%" border="0">
						    <tr>
							<td align="center" style="border:0;padding:0;"><div class="turnPage"><p>{*$page*}</p></div></td>
							</tr>
						</table>                                </td>
					</tr>
				    </tbody>
				</table>
			    </form>
			</div>
		    </div>
			
			<div class="content_main_bottom">
				<div class="content_main_bottom_left"></div>
				<div class="content_main_bottom_right"></div>
		    </div>			

		    {*/if*}
			</div>
		</td>
    </tr>
</table>
{*include file="template/admin_foot.htm"*}